cmake_minimum_required(VERSION 3.5)

project(jz_test)

set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)

find_package(Qt6 REQUIRED COMPONENTS test core gui xml widgets opengl OpenGLWidgets network)

include_directories(./)

set(jz_test_net_sources    
    testNet.cpp
	testNet.h
	testCo.cpp
	testCo.h
	../jzCo/JZCo.cpp
	../jzCo/JZCo.h
	../jzCo/JZCoContext.cpp
	../jzCo/JZCoContext.h
	../jzCo/JZCoCoroutine.cpp
	../jzCo/JZCoCoroutine.h
	../jzCo/JZCoFile.cpp
	../jzCo/JZCoFile.h
	../jzCo/JZCoNetwork.cpp
	../jzCo/JZCoNetwork.h
	../jzNet/JZNetClient.cpp
	../jzNet/JZNetClient.h
	../jzNet/JZNetDataManager.cpp
	../jzNet/JZNetDataManager.h
	../jzNet/JZNetFileTrans.cpp
	../jzNet/JZNetFileTrans.h
	../jzNet/JZNetPack.cpp
	../jzNet/JZNetPack.h
	../jzNet/JZNetServer.cpp
	../jzNet/JZNetServer.h)

add_executable(jz_test ${jz_test_net_sources})
target_link_libraries(jz_test 
    Qt6::Network
	Qt6::Test)
	
set(jz_test_3d_sources    
    testGLWidget.cpp
	testGLWidget.h
	../jz3d/JZGLItem.cpp
    ../jz3d/JZGLItem.h
    ../jz3d/JZGLScene.cpp
    ../jz3d/JZGLScene.h
    ../jz3d/JZGLView.cpp
    ../jz3d/JZGLView.h
	../jz3d/JZGLCamera.cpp
	../jz3d/JZGLCamera.h
	../jz3d/JZGLGemo.cpp
	../jz3d/JZGLGemo.h)
add_executable(jz_test_3d ${jz_test_3d_sources})
target_link_libraries(jz_test_3d PRIVATE 
    Qt6::Widgets
    Qt6::OpenGL
	Qt6::OpenGLWidgets)
	
set(jz_rpc_test_sources    
    testRpcServer.cpp
	testRpcServer.h
	../JZRpc/JZRpcHttpServer.cpp
	../JZRpc/JZRpcHttpServer.h)
	
add_executable(jz_rpc_test ${jz_rpc_test_sources})
target_link_libraries(jz_rpc_test 
    Qt6::Network
	Qt6::Test)
	
set(jz_web_test_sources    
    testWebServer.cpp
	testWebServer.h
	../jzWebServer/JZWebPage.cpp
	../jzWebServer/JZWebPage.h
	../jzWebServer/JZWebServer.cpp
	../jzWebServer/JZWebServer.h
	../jzWebServer/JZWebWidget.cpp
	../jzWebServer/JZWebWidget.h
	../jzWebServer/JZWebLayout.cpp
	../jzWebServer/JZWebLayout.h
	../jzWebServer/JZWebContext.cpp
	../jzWebServer/JZWebContext.h
	../jzWebServer/JZWebRequest.cpp
	../jzWebServer/JZWebRequest.h
	../jzWebServer/JZWebResponse.cpp
	../jzWebServer/JZWebResponse.h
	../jzWebServer/JZWebHttpCookie.cpp
	../jzWebServer/JZWebHttpCookie.h
)
	
add_executable(jz_web_test ${jz_web_test_sources})
target_link_libraries(jz_web_test 
    Qt6::Network
	Qt6::Gui
	Qt6::Xml
	Qt6::Test)